<!DOCTYPE html>
<html lang="en">
    <head>
        <title></title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <script src="./lib/vue-2.4.0.js"></script>
    </head>
    <body>
        <div id="app">
            <a href="javascript:;" @click='flag=true'>登录</a>
            <a href="javascript:;" @click = 'flag=false'>注册</a>

            <login  v-if="flag"></login>
            <register v-else="flag"></register>

        </div>
        <script>
            Vue.component("login",{
                template:'<p>登录页面</P>'
            })
            Vue.component('register',{
                template:'<p>注册页面</p>'
            })
            
            var vm = new Vue({
                el: '#app',
                data: {
                    flag:true
                },
                methods:{

                }
            })
        </script>
    </body>
</html>